package com.tidy.seed.util;

public class HttpUtils {
    private HttpUtils() {
        // 私有构造防止实例化
    }

    public static String getMethod(int code) {
        switch (code) {
            case 1:
                return "GET";
            case 2:
                return "POST";
            case 3:
                return "PATCH";
            case 4:
                return "DELETE";
            default:
                throw new IllegalArgumentException("Invalid code: " + code);
        }
    }

    // 以后可以继续加别的 HTTP 相关工具方法
}
